{**
 * DMTK.tpl: hien thi cho xem cac tai khoan trong DMuc
 *<a class="action" href="{url op="createDMTK"}">Th&#234;m T&#224;i kho&#7843;n</a>
 *}

{strip}
{assign var="pageTitle" value="Danh muc Tai Khoan"}
{assign var="socot" value="3"}
{include file="common/header.tpl"}
{/strip}

{assign var="matk" value=""}
{assign var="tentk" value=""}

<div id = "search" style= "text-align: center; padding: 10px 20px ; width:100%; color: #458B74" >
<strong style="font-size: 2em;" >THIẾT LẬP TK BÁO CÁO - CÂN ĐỐI TÀI KHOẢN</strong>
<script type="text/javascript">
{literal}
<!--
function toggleChecked() {
	var elements = document.chuyengia.elements;
	for (var i=0; i < elements.length; i++) {
		if (elements[i].name == 'bcc[]') {
			elements[i].checked = !elements[i].checked;
		}
	}
}

// -->
{/literal}
</script>
	
<form method="post" action="{url page='acctSS' op='SS_KTTH_BCTC_TKBC'}">

	&nbsp;&nbsp;&nbsp;
	<br>
	<br>
	<select name="searchField" size="1" class="selectMenu">
		{html_options options=$fieldOptions selected=$searchField}
	</select>
	<select name="searchMatch" size="1" class="selectMenu">
		<option value="contains"{if $searchMatch == 'contains'} selected="selected"{/if}>C&#243; ch&#7913;a</option>
		<option value="is"{if $searchMatch == 'is'} selected="selected"{/if}>L&#224;</option>
		<option value="startsWith"{if $searchMatch == 'startsWith'} selected="selected"{/if}>B&#7855;t &#273;&#7847;u l&#224; </option>
	</select>

	<input type="text" size="10" name="search" class="textField" value="{$search|escape}" />&nbsp;<input type="submit" value="{translate key="common.search"}" class="button" />
</form>

<br>
<br>
<form name="chuyengia" method="post" action="{url page='acctSS' op='SS_KTTH_BCTC_TKBC_luu'}">

<p  align="right"><input type="button" value="{translate key="common.selectAll"}" class="button" onclick="toggleChecked()" /> <input type="submit" value="Lưu " class="button" onclick="document.location.href='{url op="SS_KTTH_BCTC_TKBC_luu" escape=false}'" />
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </p>

<div id="sections">

<table width="100%" id="customers">
	<tr valign="bottom">
		<th width="15%">M&#227; T&#224;i kho&#7843;n</th>
		<th width="60%">T&#234;n T&#224;i kho&#7843;n</th>
		<th width="10%">BC CĐTK</th>
	</tr>

	

{assign var="stt" value="0"}
{iterate from=dmtks item=dmtk name=dmtks}
	{assign var = "matk" value = $dmtk->getmatk()}
	{assign var = "tentk" value = $dmtk->gettentk()|escape}
	{assign var = "loaitk" value = $dmtk->getloaitk()|escape}
	{if $stt ==0}
		{assign var="stt" value="1"}
		<tr valign="top" class="alt0">
			<td class="drag">{$dmtk->getmatk()|escape}</td>
			<td class="drag">{$dmtk->gettentk()|escape}</td>
			<td><input type="checkbox" name="bcc[]" value="{$dmtk->getmatk()|escape}" {if $dmtk->getcdtk()} checked="checked"{/if}/></td>
					
		</tr>
	{else}
		{assign var="stt" value="0"}
		<tr valign="top" class="alt">
			<td class="drag">{$dmtk->getmatk()|escape}</td>
			<td class="drag">{$tentk}</td>
			<td><input type="checkbox" name="bcc[]" value="{$dmtk->getmatk()|escape}" {if $dmtk->getcdtk()} checked="checked"{/if}/></td>
	
		</tr>
	{/if}
{/iterate}

<tr>
	<td colspan="{$socot}" class="endseparator">&nbsp;</td>
</tr>

</table>
</div>

</form>
{include file="common/footer.tpl"}

